<?php
defined('IN_IA') or exit('Access Denied');
global $_W, $_GPC;
if (!pdo_fieldexists('bsht_tbk_all_caiji', 'tktype') || !pdo_fieldexists('bsht_tbk_all_item', 'tktype')) {
	pdo_query('ALTER TABLE ' . tablename('bsht_tbk_all_caiji') . ' ADD `tktype` int(11) DEFAULT \'0\';');
	pdo_query('ALTER TABLE ' . tablename('bsht_tbk_all_item') . ' ADD `tktype` int(11) DEFAULT \'0\';');
	pdo_query('ALTER TABLE ' . tablename('bsht_tbk_set') . ' ADD `diytkl` varchar(255) DEFAULT NULL;');
	pdo_query('ALTER TABLE ' . tablename('bsht_tbk_set') . ' ADD `isnav` int(11) DEFAULT \'1\';');
	message('数据库升级成功！', $this->createWebUrl('opcenter'), 'success');
} else {
	message('无需升级操作！', $this->createWebUrl('opcenter'), 'error');
}